package cn.edu.zafu.bigdata.YinMingyan.chapter04.q2;

// TestMathOperations.java
public class TestMathOperations {
    public static void main(String[] args) {
        MathOperations mathOps = new MathOperations();

        // 调用add()方法，传入两个整数参数
        int sumInt = mathOps.add(6, 3);
        System.out.println("两个整数之和为: " + sumInt); // 输出：Sum of integers: 8

        // 调用add()方法，传入两个浮点数参数
        double sumDouble = mathOps.add(4.5, 6.3);
        System.out.println("两个浮点数之和为: " + sumDouble); // 输出：Sum of doubles: 8.8

        // 调用add()方法，传入三个整数参数
        int sumThreeInts = mathOps.add(5, 6, 2);
        System.out.println("三个整数之和为: " + sumThreeInts); // 输出：Sum of three integers: 10
    }
}